package com.cmc.cloud.cmclink.doc.vo.blnoruleyearvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/**
 * 订舱号提单号规则 年份 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BlnoRuleYearBaseVO {

    @Schema(description = "年份", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BlnoRuleYearBaseVO.etdYear.NotBlank}")
    @Length(max = 4, message = "{BlnoRuleYearBaseVO.etdYear.Length}")
    private String etdYear;

    @Schema(description = "年份代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{BlnoRuleYearBaseVO.yearBlnoCode.NotBlank}")
    @Length(max = 1, message = "{BlnoRuleYearBaseVO.yearBlnoCode.Length}")
    private String yearBlnoCode;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BlnoRuleYearBaseVO.enable.NotNull}")
    private Boolean enable;

}
